package com.ruoyi.xh.service.impl;

import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.xh.mapper.XhSetMapper;
import com.ruoyi.xh.domain.XhSet;
import com.ruoyi.xh.service.IXhSetService;

/**
 * 分成设置Service业务层处理
 * 
 * @author songjw
 * @date 2024-12-13
 */
@Service
public class XhSetServiceImpl extends ServiceImpl<XhSetMapper,XhSet> implements IXhSetService {

    /**
     * 查询分成设置
     * 
     * @param id 分成设置主键
     * @return 分成设置
     */
    @Override
    public XhSet selectXhSetById(Long id)
    {
        return this.getById(id);
    }

    /**
     * 查询分成设置列表
     * 
     * @param xhSet 分成设置
     * @return 分成设置
     */
    @Override
    public Page<XhSet> selectXhSetList(XhSet xhSet)
    {
        return new Page<>();
    }

    /**
     * 新增分成设置
     * 
     * @param xhSet 分成设置
     *
     */
    @Override
    public void insertXhSet(XhSet xhSet)
    {
        this.save(xhSet);
    }

    /**
     * 修改分成设置
     * 
     * @param xhSet 分成设置
     *
     */
    @Override
    public void updateXhSet(XhSet xhSet)
    {
        this.updateById(xhSet);
    }

    /**
     * 批量删除分成设置
     * 
     * @param ids 需要删除的分成设置主键
     *
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void deleteXhSetByIds(Long[] ids)
    {
        this.removeByIds(Stream.of(ids).collect(Collectors.toSet()));
    }
}
